﻿using System.Collections.Generic;
using DomainExample.DomainModel.PersonModel;
using DomainExample.Repository;

namespace ContactService
{
    public class AddressBook
    {
        IPersonRepository _personRepository;

        public AddressBook(IPersonRepository personRepository)
        {
            _personRepository = personRepository;
        }

        public IEnumerable<Person> Search(PersonSearch criteria)
        {
            return _personRepository.GetForSearch(criteria);
        }
    }
}
